package com.pig4cloud.pigx.shop.user.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.entity.ShopUserPointChangeRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteShopUserPointChangeRecordService", value = ServiceNameConstants.SHOP_USER_SERVICE)
public interface RemoteShopUserPointChangeRecordService {

	/**
	 * 添加积分变更记录
	 * @param shopUserPointChangeRecord
	 * @param from
	 * @return
	 */
	@PostMapping("/user/point/change_record/addPointChange")
	R addPointChange(@RequestBody ShopUserPointChangeRecord shopUserPointChangeRecord,
			@RequestHeader(SecurityConstants.FROM) String from);

}
